package ginsrv

import (
	"github.com/gin-gonic/gin"
	"gogs.xiaoyuanjijiehao.com/antlinker/antcms/ddd"
)

// StartGinHanler gin hook
type StartGinHanler func(e *gin.Engine)

// Server 服务接口
type Server interface {
	// 运行服务，阻塞状态
	Run() error
	// 优雅的停止服务
	Shutdown()
	// 注册hook最好在Run运行之前
	RegStartHook(StartGinHanler)
	Domain() ddd.Domain
	Engine() *gin.Engine
}
